<template>
    <field v-bind="$props">
        <div class="ui fluid input">
            <input type="text" :disabled="disabled" :value="value" @input="evt => {this.$emit('input', evt.target.value)}">
        </div>
        <img v-if="value" :src="value" class="ui centered image" :class="size">
    </field>
</template>


<script>
import Field from './Field'

export default {
    name: 'image-field',
    props: {
        ...Field.props,
        size: {
            type: String,
            default: 'medium',
        },
        disabled: {
            type: Boolean,
        }
    },
}
</script>
